
const helperExtensions = require('../../helper/test-helper-extensions')

module.exports = {

  "testSimpleReadWithClientFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "467a879051898098",
      "type": "tab",
      "label": "Simple Read With Client",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "445454e4.968564",
      "type": "modbus-server",
      "z": "467a879051898098",
      "name": "",
      "logEnabled": true,
      "hostname": "0.0.0.0",
      "serverPort": "9503",
      "responseDelay": 100,
      "delayUnit": "ms",
      "coilsBufferSize": 10000,
      "holdingBufferSize": 10000,
      "inputBufferSize": 10000,
      "discreteBufferSize": 10000,
      "showErrors": false,
      "x": 360,
      "y": 100,
      "wires": [
        [],
        [],
        [],
        [],
        []
      ]
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "467a879051898098",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "logIOActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "1",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6358",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "emptyMsgOnFail": false,
      "x": 370,
      "y": 220,
      "wires": [
        [
          "h1"
        ],
        [
          "h2"
        ]
      ]
    },
    {
      "id": "h1",
      "type": "helper",
      "z": "467a879051898098",
      "name": "",
      "tosidebar": true,
      "console": false,
      "tostatus": false,
      "complete": "payload",
      "targetType": "msg",
      "statusVal": "",
      "statusType": "auto",
      "x": 710,
      "y": 180,
      "wires": []
    },
    {
      "id": "h2",
      "type": "helper",
      "z": "467a879051898098",
      "name": "",
      "tosidebar": true,
      "console": false,
      "tostatus": false,
      "complete": "payload",
      "targetType": "msg",
      "statusVal": "",
      "statusType": "auto",
      "x": 630,
      "y": 260,
      "wires": []
    },
    {
      "id": "466860d5.3f6358",
      "type": "modbus-client",
      "name": "ModbusClientRead",
      "clienttype": "tcp",
      "bufferCommands": true,
      "stateLogEnabled": false,
      "queueLogEnabled": false,
      "failureLogEnabled": false,
      "tcpHost": "127.0.0.1",
      "tcpPort": "9503",
      "tcpType": "DEFAULT",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU-BUFFERD",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "100",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeTcpDefaultFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "b3c94e07c24b7584",
      "type": "tab",
      "label": "Should Be TCP Default",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "b3c94e07c24b7584",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "logIOActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "4",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6358",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "emptyMsgOnFail": false,
      "x": 390,
      "y": 320,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "466860d5.3f6358",
      "type": "modbus-client",
      "name": "ModbusClientTCPDefault",
      "clienttype": "tcp",
      "bufferCommands": true,
      "stateLogEnabled": true,
      "queueLogEnabled": true,
      "failureLogEnabled": false,
      "tcpHost": "127.0.0.1",
      "tcpPort": "502",
      "tcpType": "DEFAULT",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU-BUFFERD",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "50",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeWrongTcpFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "bca7a6988613ce93",
      "type": "tab",
      "label": "Should Be Wrong TCP",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "bca7a6988613ce93",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "4",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6358",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "x": 410,
      "y": 280,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "466860d5.3f6358",
      "type": "modbus-client",
      "name": "ModbusClientTCPDefault",
      "clienttype": "tcp",
      "bufferCommands": true,
      "stateLogEnabled": true,
      "queueLogEnabled": true,
      "failureLogEnabled": false,
      "tcpHost": "192.168.99.1",
      "tcpPort": "502",
      "tcpType": "DEFAULT",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU-BUFFERD",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "50",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeTcpTelnetFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "a674858b62715372",
      "type": "tab",
      "label": "Should Be TCP Telnet",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "a674858b62715372",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "4",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6359",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "x": 410,
      "y": 300,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "466860d5.3f6359",
      "type": "modbus-client",
      "name": "ModbusClientTCPTelnet",
      "clienttype": "tcp",
      "bufferCommands": true,
      "stateLogEnabled": true,
      "queueLogEnabled": true,
      "failureLogEnabled": false,
      "tcpHost": "127.0.0.1",
      "tcpPort": "502",
      "tcpType": "TELNET",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU-BUFFERD",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "100",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeTcpRtuBufferedFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "0c58ded806670f33",
      "type": "tab",
      "label": "Should Be TCP RTU-Buffered",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "0c58ded806670f33",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "logIOActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "4",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6360",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "emptyMsgOnFail": false,
      "x": 330,
      "y": 200,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "466860d5.3f6360",
      "type": "modbus-client",
      "name": "ModbusClientTCPRTUB",
      "clienttype": "tcp",
      "bufferCommands": true,
      "stateLogEnabled": true,
      "queueLogEnabled": true,
      "failureLogEnabled": false,
      "tcpHost": "127.0.0.1",
      "tcpPort": "502",
      "tcpType": "RTU-BUFFERED",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU-BUFFERD",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "100",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeTcpC701Flow": helperExtensions.cleanFlowPositionData([
    {
      "id": "e2c427b923001218",
      "type": "tab",
      "label": "Should Be TCP C701",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "e2c427b923001218",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "logIOActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "4",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6361",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "emptyMsgOnFail": false,
      "x": 350,
      "y": 240,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "466860d5.3f6361",
      "type": "modbus-client",
      "name": "ModbusClientTCPC701",
      "clienttype": "tcp",
      "bufferCommands": true,
      "stateLogEnabled": true,
      "queueLogEnabled": true,
      "failureLogEnabled": false,
      "tcpHost": "127.0.0.1",
      "tcpPort": "502",
      "tcpType": "C701",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU-BUFFERD",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "100",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeSerialRtuBufferedFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "ddf17b94b9e4b425",
      "type": "tab",
      "label": "Should Be Serial RTU-Buffered",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "ddf17b94b9e4b425",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "logIOActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "4",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6362",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "emptyMsgOnFail": false,
      "x": 470,
      "y": 360,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "466860d5.3f6362",
      "type": "modbus-client",
      "name": "ModbusClientSerialRTUB",
      "clienttype": "simpleser",
      "bufferCommands": true,
      "stateLogEnabled": true,
      "queueLogEnabled": true,
      "failureLogEnabled": false,
      "tcpHost": "127.0.0.1",
      "tcpPort": "502",
      "tcpType": "C701",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU-BUFFERD",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "100",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeSerialRtuFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "2cd0c740bf2728d5",
      "type": "tab",
      "label": "Should Be Serial RTU-Buffered",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "2cd0c740bf2728d5",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "logIOActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "4",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6363",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "emptyMsgOnFail": false,
      "x": 350,
      "y": 300,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "466860d5.3f6363",
      "type": "modbus-client",
      "name": "ModbusClientSerialRTU",
      "clienttype": "simpleser",
      "bufferCommands": true,
      "stateLogEnabled": true,
      "queueLogEnabled": true,
      "failureLogEnabled": false,
      "tcpHost": "127.0.0.1",
      "tcpPort": "502",
      "tcpType": "C701",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "100",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeSerialAsciiFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "2940d529fb87d08a",
      "type": "tab",
      "label": "Should Be Serial Ascii",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "384fb9f1.e96296",
      "type": "modbus-read",
      "z": "2940d529fb87d08a",
      "name": "",
      "topic": "",
      "showStatusActivities": false,
      "logIOActivities": false,
      "showErrors": false,
      "unitid": "",
      "dataType": "Coil",
      "adr": "0",
      "quantity": "10",
      "rate": "4",
      "rateUnit": "s",
      "delayOnStart": false,
      "startDelayTime": "",
      "server": "466860d5.3f6364",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "emptyMsgOnFail": false,
      "x": 250,
      "y": 200,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "466860d5.3f6364",
      "type": "modbus-client",
      "name": "ModbusClientSerialASCII",
      "clienttype": "simpleser",
      "bufferCommands": true,
      "stateLogEnabled": true,
      "queueLogEnabled": true,
      "failureLogEnabled": false,
      "tcpHost": "127.0.0.1",
      "tcpPort": "502",
      "tcpType": "C701",
      "serialPort": "/dev/ttyUSB",
      "serialType": "ASCII",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "100",
      "serialAsciiResponseStartDelimiter": "",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "100",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "200",
      "parallelUnitIdsAllowed": false
    }
  ]),

  "testShouldBeInactiveFlow": helperExtensions.cleanFlowPositionData([
    {
      "id": "dee6791347fc9889",
      "type": "tab",
      "label": "client active mode test",
      "disabled": false,
      "info": "",
      "env": []
    },
    {
      "id": "067caad9aeed05bb",
      "type": "modbus-flex-getter",
      "z": "dee6791347fc9889",
      "name": "",
      "showStatusActivities": true,
      "showErrors": true,
      "logIOActivities": false,
      "server": "53f6fb33a3f90ead",
      "useIOFile": false,
      "ioFile": "",
      "useIOForPayload": false,
      "emptyMsgOnFail": false,
      "keepMsgProperties": false,
      "x": 350,
      "y": 200,
      "wires": [
        [],
        []
      ]
    },
    {
      "id": "53f6fb33a3f90ead",
      "type": "modbus-client",
      "name": "",
      "clienttype": "tcp",
      "bufferCommands": true,
      "stateLogEnabled": false,
      "queueLogEnabled": false,
      "failureLogEnabled": true,
      "tcpHost": "127.0.0.1",
      "tcpPort": "10502",
      "tcpType": "DEFAULT",
      "serialPort": "/dev/ttyUSB",
      "serialType": "RTU-BUFFERD",
      "serialBaudrate": "9600",
      "serialDatabits": "8",
      "serialStopbits": "1",
      "serialParity": "none",
      "serialConnectionDelay": "100",
      "serialAsciiResponseStartDelimiter": "0x3A",
      "unit_id": "1",
      "commandDelay": "1",
      "clientTimeout": "1000",
      "reconnectOnTimeout": true,
      "reconnectTimeout": "2000",
      "parallelUnitIdsAllowed": true
    }
  ])
}